<script>
	function hideRankPanel(rank_p) {
		query = '#' + rank_p + ' > #voteup'
		$(query).hide();
		
		query = '#' + rank_p + ' > #votedown'
		$(query).hide();
		
		query = '#' + rank_p + ' > #loadingup'
		$(query).show();
	
		query = '#' + rank_p + ' > #loadingdown'
		$(query).show();
				
	}	
	
	var pageURL = "<%= proposal_path(@proposal) %>";	//need this for ajaxify pagination 
	
		
</script>	

<h3><%=h @proposal.title %></h3>
<div id="proposal<%= @proposal.id %>" class="blogComment">
    <div class="blogUserImage">
        <%= @proposal.user_image_tag %>
    </div>
    <div class="triangle-right left">
        <table>
            <body>
                <tr>
                    <td>
                        <div id="proposalcc" style="width:680px; float:left">
                            <div class="baloon_header">
                                <div class="blogCommentPostedAt">
                                    Inserita il <span class="blogPostDate"><%= @proposal.created_at.strftime("%d/%m/%Y") %></span>
                                    da <span class="blogPoster"><%= @proposal.user.link_to_page %></span>
                                    <%if @proposal.updated_at != nil %>
                                    (Ultima modifica del <%= @proposal.updated_at.strftime("%d/%m/%Y") %>)<%end %>
                                    <a class="spch-bub-inside" href="#proposalComments"><span class="point"></span><em><%=@proposal.comments.count %></em></a>
                                </div>
                            </div>
                            <div class="baloon-content">
                                <%=h @proposal.content %>
                            </div>
                            <div class="baloon-footer">
                                <%= link_to 'Modifica', edit_proposal_path(@proposal) if (is_proprietary? @proposal) %>
                            </div>
                        </div>
                    </td>
                    <td>
                        <div id="rankingpanelcontainer" style="width:40px; float:left;">
                            <%= render :partial => 'proposals/ranking_panel' %>
                        </div>
                    </td>
                </tr>
            </body>
        </table>
    </div>
</div>
<%= render :partial => @proposal_comment = ProposalComment.new, :locals => { :button_name => 'Invia risposta' } %>

<div id="flash_messages_comments" style="height:20px">
</div>
<div id="proposalCommentsContainer">
<%= render :partial => 'proposals/comments' %>
</div>
<%= link_to 'Indietro', proposals_path %>
